﻿using System.Collections.Generic;
using Newtonsoft.Json;

namespace T.FAS.Runtime.Metadata.Entity.MF
{

    // 代码节点
    public class CodeNode : NodeBase
    {
        [JsonProperty("data")]
        public new CodeNodeData Data { get; set; }
    }


    public class CodeNodeData
    {
        [JsonProperty("label")]
        public string Label { get; set; }

        [JsonProperty("description")]
        public string Description { get; set; }

        [JsonProperty("language")]
        public string Language { get; set; }

        [JsonProperty("code")]
        public string Code { get; set; }

        [JsonProperty("inputFields")]
        public List<UserVariable> InputVariables { get; set; }
        [JsonProperty("error_strategy")]
        public string ErrorStrategy { get; set; }

        [JsonProperty("default_value")]
        public List<UserVariable> DefaultValues { get; set; }
        [JsonProperty("outputFields")]
        public List<UserVariable> OutputVariables { get; set; }

        [JsonProperty("enableTimeout")]
        public bool EnableTimeout { get; set; }

        [JsonProperty("timeout")]
        public int Timeout { get; set; }
    }
}
